package anji.plus.system.mark.dto;

import anji.plus.system.mark.domain.TaskNodeList;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.text.DecimalFormat;
import java.util.List;

/**
 * <p>
 * 任务表
 * </p>
 *
 * @author luwei
 * @since 2023-11-08
 */
@Data
public class RankInfo {

    private static final long serialVersionUID = 1L;

    /**
     * 用户姓名
     */
    private String userName;

    /**
     * 用户月得分
     */
    private Double taskScore;

    /**
     * 用户月任务数
     */
    private Integer taskCount;

    /**
     * 用户月任务数
     */
    private Double taskTimeNum;

    /**
     * 用户月中是否提交3个任务
     */
    private String taskNumIsEnough;

    //get()/set()方法
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Double getTaskScore() {
        if (this.taskScore == null) {
            return 0.00;
        }
        DecimalFormat df = new DecimalFormat("#.00");
        String f1 = df.format(taskScore);
        return Double.valueOf(f1);
    }

    public void setTaskScore(Double taskScore) {
        this.taskScore = taskScore;
    }

    public Integer getTaskCount() {
        return taskCount;
    }

    public void setTaskCount(Integer taskCount) {
        this.taskCount = taskCount;


    }

    //保留2位小数
    public Double getTaskTimeNum() {
        if(this.taskTimeNum == null){
            return  0.00;
        }
        DecimalFormat df = new DecimalFormat("#.00");
        String f1 = df.format(taskTimeNum);
        return Double.valueOf(f1);
    }

    public void setTaskTimeNum(Double taskTimeNum) {
        if(taskTimeNum == null){
            this.taskTimeNum = 0.00;
        }else{
            this.taskTimeNum = taskTimeNum;
        }
    }

    public String getTaskNumIsEnough() {
        if(this.taskNumIsEnough == null){
            return  "0";
        }
        return taskNumIsEnough;
    }

    public void setTaskNumIsEnough(String taskNumIsEnough) {
        if(taskNumIsEnough == null){
            this.taskNumIsEnough = "0";
        }else{
            this.taskNumIsEnough = taskNumIsEnough;
        }
    }
}